//
// Created by rengen.gong on 2021/12/2.
//

#ifndef LEARN1_LEARNCONSTRUCTOR_H
#define LEARN1_LEARNCONSTRUCTOR_H

#include "iostream"
using namespace std;

class A {
    int x;
public:
    A(int i=0) {
        x=i;
        cout << "A-----"<<x<<endl;
    }
};
class B {
    int y;
public:
    B(int i) {
        y=i;
        cout << "B-----"<<y<<endl;
    }
};
class C {
    int z;
public:
    C(int i) {
        z=i;
        cout << "C-----"<<z<<endl;
    }
};

class LearnConstructor : public B{

public:
    C c1, c2;
    A *a1 = new A(10);
    A a0,a4;
    LearnConstructor( ) : a4(4),c2(2),c1(1),B(1) {
        cout << "D-----5"<<endl;
    }

};

#endif //LEARN1_LEARNCONSTRUCTOR_H
